package com.itliang.core.model.vo;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.itliang.utils.easyexcel.SysUserGenderConverter;
import com.itliang.utils.easyexcel.SysUserStatusConverter;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 用户视图
 *
 * @TableName user
 */
@Data
public class SysUserVO implements Serializable {
    /**
     * id
     */
    @ExcelIgnore
    private Long id;

    /**
     * 账号
     */
    @ExcelProperty(value = "用户账号", index = 0)
    private String userAccount;

    /**
     * 用户昵称
     */
    @ExcelProperty(value = "用户名称", index = 1)
    private String userName;

    /**
     * 用户头像
     */
    @ExcelProperty(value = "用户头像", index = 2)
    @ColumnWidth(30)
    private String userAvatar;

    /**
     * 性别
     */
    @ExcelProperty(value = "用户性别", index = 3, converter = SysUserGenderConverter.class)
    private Integer gender;

    /**
     * 手机
     */
    @ExcelProperty(value = "手机", index = 4)
    @ColumnWidth(20)
    private String phone;

    /**
     * 状态 1-正常 0-停用
     */
    @ExcelProperty(value = "状态", index = 5, converter = SysUserStatusConverter.class)
    private Integer status;

    /**
     * 创建时间
     */
    @ExcelProperty(value = "创建时间", index = 6)
    @ColumnWidth(30)
    private Date createTime;

    private static final long serialVersionUID = 1L;
}